<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='javascript:;' class="on"><em>会员管理</em></a><span>
		</div>
	</div>
	<div class="pad_10">
		<form name="searchform" action="" method="get">
			<table width="100%" cellspacing="0" class="search-form">
				<tbody>
					<tr>
						<td><div class="explain-col">
								邮箱 <input type="text" value="" class="input-text" id="email" name="email"> 注册时间
								<input type="text" name="start_time" id="start_time" value=""
									size="20" class="date" readonly>&nbsp; 至 <input
									type="text" name="end_time" id="end_time" value="" size="20"
									class="date" readonly> <input type="button"
									onclick="Search()" value="搜索" class="button" name="dosubmit">
							</div></td>
					</tr>
				</tbody>
			</table>
		</form>
		<div class="table-list">
			<form name="myform" action="/Administrator/listorder/" method="post">
				<table width="100%" cellspacing="0">
					<thead>
						<tr>
							<th width="5%">UID</th>
							<th width="10%" align="left">邮箱</th>
							<th width="5%" align="left">性别</th>
							<th width="5%" align="left">生日</th>
							<th width="5%" align="left">QQ</th>
							<th width="10%" align="left">省/市/区</th>
							<th width="3%" align="left">状态</th>
							<th width="10%">最后登陆IP</th>
							<th width="10%">注册时间</th>
							<th width="10%">管理操作</th>
						</tr>
					</thead>
					<tbody>
						<?php
						if(!empty($list)){
						  foreach ($list as $val) { 
						?>
						<tr>
							<td width="5%" align="center"><?php echo $val['User']['uid'] ?></td>
							<td width="10%"><?php echo $val['User']['email'] ?></td>
							<td width="5%"><?php if ($val['User']['sex']==0){ echo '未知'; }elseif($val['User']['sex']==1){echo '男';}else{ echo '女'; } ?></td>
							<td width="5%"><?php echo $val['User']['birthdate'] ?></td>
							<td width="5%"><?php echo $val['User']['qq'] ?></td>
							<td width="10%"><?php echo $val['User']['address'] ?></td>
							<td width="3%"><?php if ($val['User']['status']==0){ echo '正常'; }else{ echo '锁定'; } ?></td>
							<td width="10%" align="center"><?php echo $val['User']['lastip'] ?></td>
							<td width="10%" align="center"><?php echo $val['User']['ctime'] ?></td>
							<td width="10%" align="center"><a href="javascript:;"
								onclick="edit(<?php echo $val['User']['uid'] ?>)">修改</a> | 
								 <a href="javascript:;" onclick="del(<?php echo $val['User']['uid'] ?>)">删除</a>
							</td>
						</tr>
						<?php } } ?>
					</tbody>
				</table>
				<div id="pages"><?php echo $this->Page->show($perpage, $total, $curpage, 10, '/Members/index/email:' . $email . '/start_time:' . $start_time . '/end_time:' . $end_time . '/page:', 2 .'/'); ?></div>
			</form>
		</div>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function() {
		Calendar.setup({
			weekNumbers : true,
			inputField : "start_time",
			trigger : "start_time",
			dateFormat : "%Y-%m-%d %H:%M:%S",
			showTime : true,
			minuteStep : 1,
			onSelect : function() {
				this.hide();
			}
		});

		Calendar.setup({
			weekNumbers : true,
			inputField : "end_time",
			trigger : "end_time",
			dateFormat : "%Y-%m-%d 23:59:59",
			showTime : true,
			minuteStep : 1,
			onSelect : function() {
				this.hide();
			}
		});
	});

	//搜索
	function Search() {
		url = '/Members/index/';
		url += 'email:' + $('#email').val() + '/';
		url += 'start_time:' + $('#start_time').val() + '/';
		url += 'end_time:' + $('#end_time').val() + '/';

		window.location.href = url;
	};
</script>